-- GENERATED SPELL FOR [Manahound] --


function spell0_8718(pUnit, Event) --@Mana Burn,Self--
pUnit:FullCastSpellOnTarget(20817,pUnit)
pUnit:RegisterEvent('Sorts_8718', 1000, 1)
end

function spell1_8718(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(3604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8718', 8000, 1)
end

function spell2_8718(pUnit, Event) --@Vicious Rend,n/a--
pUnit:FullCastSpellOnTarget(14331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8718', 15000, 1)
end

function Sorts_8718(pUnit, Event)
local choix_sorts_8718 = math.random(0, 2)
if choix_sorts_8718 == 0 then
pUnit:RegisterEvent('spell0_8718', 1, 1)
end
if choix_sorts_8718 == 1 then
pUnit:RegisterEvent('spell1_8718', 1, 1)
end
if choix_sorts_8718 == 2 then
pUnit:RegisterEvent('spell2_8718', 1, 1)
end
end

function mob8718_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8718', math.random(1500, 3000), 1)
end

function mob8718_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8718_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8718_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8718, 1, 'mob8718_Action')
RegisterUnitEvent(8718, 2, 'mob8718_Leave')
RegisterUnitEvent(8718, 3, 'mob8718_Kill')
RegisterUnitEvent(8718, 4, 'mob8718_Die')
